package wxy.adpater;

public class CommonCarAdapter extends CarController {
    private CommonSound sound;  //定义适配者PoliceSound对象
    private CommonLamp lamp;   //定义适配者PoliceLamp对象

    public CommonCarAdapter() {
        sound = new CommonSound();
        lamp = new CommonLamp();
    }

    public void Move() {
        System.out.println("普通车移动！");
    }


    public void phonate() {
        sound.alarmSound();
    }

    //呈现警灯闪烁
    public void twinkle() {
        lamp.alarmLamp();
    }
}

